﻿#ifndef WORKTHREAD_H
#define WORKTHREAD_H

#include <QMutex>
#include <QThread>

class QDBService;
class DataManger;
class WorkThread : public QThread
{
	Q_OBJECT

public:
	WorkThread(QObject *parent = 0);
	~WorkThread();

public:
	int getRefCount() const;
	QJsonObject requestData(const QString & method, const QByteArray & request);

protected:
	void run();

private:
	int iRefCount;
	QMutex mutexThread;
	DataManger * pDataManger;
	QDBService * pDBService;
};

#endif // WORKTHREAD_H
